Skip to content

Reduce iterations and allocations for Namespace#routes#2440

Merged
pablobm merged 2 commits intothoughtbot:mainfrom
enviable:optimize-namespace-routes
Jan 24, 2025
Merged

Reduce iterations and allocations for Namespace#routes#2440
pablobm merged 2 commits intothoughtbot:mainfrom
enviable:optimize-namespace-routes

Conversation

@enviable
Copy link
Contributor

Hello! I noticed that the Namespace#routes method was called during most/(all?) requests and could be optimized to reduce iterations and memory allocations.

@enviable enviable force-pushed the optimize-namespace-routes branch 3 times, most recently from 3699558 to 5f18abe Compare September 28, 2023 16:21
@nickcharlton nickcharlton force-pushed the optimize-namespace-routes branch from 5f18abe to b8fec65 Compare December 12, 2023 18:08
@nickcharlton
Copy link
Member

I rebased this as the tests didn't seem to have run. I'd like to test this out on a few applications first just to check there's no odd regressions in the situations I have access to, but it might take me a while.

@pablobm
Copy link
Collaborator

pablobm commented Oct 29, 2024

@nickcharlton - Were you able to test this? By the way, the CI failed, but it was some time ago so I can't see the logs. Would someone be able to rebase, please?

This method is called during all requests and this change reduces the
amount of work needed to be done.
@nickcharlton nickcharlton force-pushed the optimize-namespace-routes branch from b8fec65 to 31b60e6 Compare November 4, 2024 13:02
@nickcharlton
Copy link
Member

I've just rebased. I'll let CI run and check back in.

@pablobm
Copy link
Collaborator

pablobm commented Jan 24, 2025

I have been testing this a bit and I think it's a good change. Merging.

Thank you @enviable!

@pablobm pablobm merged commit 69e0f06 into thoughtbot:main Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants